<?#//v.3.0.0

#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////
?>
<?
$TMP_usmenutitle=$MSG_25_0115;
include phpa_include("template_user_menu_header.html");
?>
<SCRIPT Language=Javascript>
function ConfirmDel(){
	if(confirm('<?=$MSG_30_0087?>')){
		document.open.submit();
	}else{
		document.open.reset();
	}
}
function selectAllStart(formObj, isInverse) 
{
   for (var i=0;i < formObj.length;i++) 
   {
      fldObj = formObj.elements[i];
      if (fldObj.type == 'checkbox' && fldObj.name.substring(0,8)=='startnow')
      { 
         if(isInverse)
            fldObj.checked = (fldObj.checked) ? false : true;
         else fldObj.checked = true; 
       }
   }
}
function selectAllDelete(formObj, isInverse) 
{
   for (var i=0;i < formObj.length;i++) 
   {
      fldObj = formObj.elements[i];
      if (fldObj.type == 'checkbox' && fldObj.name.substring(0,8)=='O_delete')
      { 
         if(isInverse)
            fldObj.checked = (fldObj.checked) ? false : true;
         else fldObj.checked = true; 
       }
   }
}

</SCRIPT>
<form name="open" method="post" action="<?=basename($_SERVER['PHP_SELF'])?>">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="CENTER">
        <tr>
            <td colspan="6" align=right>
                <div>
                    <dl class="phpa-tabs">
                        <dd> <a href="yourauctions.php">
                            <?=$MSG_619?>
                            </a> </dd>
                        <dd> <a href="yourauctions_c.php">
                            <?=$MSG_204?>
                            </a> </dd>
                        <dd> <a href="yourauctions_s.php">
                            <?=$MGS_2__0056?>
                            </a> </dd>
                        <dd> <a href="yourauctions_sold.php">
                            <?=$MSG_25_0119?>
                            </a> </dd>
                    </dl>
                </div>
            </td>
        </tr>
        </TABLE>
	<table width="100%" border="0" cellspacing="1" cellpadding="4" align="CENTER">
	<tr bgcolor="<?=$SETTINGS['tableheadercolor']?>">
            <td class=titTable1 width="32%"> <a href=<?=basename($_SERVER['PHP_SELF'])?>?pa_ord=title&pa_type=<?=$_SESSION['pa_nexttype']?>>
                <?=$MSG_624?>
                </a>
                <?
                if($_SESSION['pa_ord'] == 'title') {
			  	?>
                <a href=<?=basename($_SERVER['PHP_SELF'])?>?pa_ord=title&pa_type=<?=$_SESSION['pa_nexttype']?>>
                <?=$_SESSION['pa_type_img']?>
                </a>
                <?
                }
				?>
            </td>
            <td class=titTable1 width="11%"> <a href=<?=basename($_SERVER['PHP_SELF'])?>?pa_ord=starts&pa_type=<?=$_SESSION['pa_nexttype']?>>
                <?=$MSG_25_0116?>
                </a>
                <?
                if($_SESSION['pa_ord'] == 'starts') {
					  ?>
                <a href=<?=basename($_SERVER['PHP_SELF'])?>?pa_ord=starts&pa_type=<?=$_SESSION['pa_nexttype']?>>
                <?=$_SESSION['pa_type_img']?>
                </a>
                <?
                }
				?>
            </td>
            <td class=titTable1 width="11%"> <a href=<?=basename($_SERVER['PHP_SELF'])?>?pa_ord=ends&pa_type=<?=$_SESSION['pa_nexttype']?>>
                <?=$MSG_25_0117?>
                </a>
                <?
                if($_SESSION['pa_ord'] == 'ends') {
					  ?>
                <a href=<?=basename($_SERVER['PHP_SELF'])?>?pa_ord=ends&pa_type=<?=$_SESSION['pa_nexttype']?>>
                <?=$_SESSION['pa_type_img']?>
                </a>
                <?
                }
				?>
            </td>
            <td class=titTable1 width="6%" align=center>
                <?=$MSG_298?>
            </td>
            <td class=titTable1 width="8%" align=center>
                <?=$MSG_008?>
            </td>
            <td class=titTable1 width="6%" align=center bgcolor="#FFFF00">
                <?=$MSG_25_0118?>
            </td>
        </tr>
        <?
        if(is_array($IDS)) {
        	while(list($k,$v) = each($IDS)) {
				  ?>
        <tr bgcolor="#EEEEEE">
            <td width="32%"><a href="item.php?id=<?=$IDS[$k]?>">
                <?=$TITLE[$k]?>
                </a></td>
            <td width="11%" bgcolor=#FFFFaa>
                <?=FormatDate($STARTS[$k])?>
            </td>
            <td width="11%">
                <?=FormatDate($ENDS[$k])?>
            </td>
            <td width="6%"  align=CENTER>
                <?
                if($BID[$k] == 0) {
  			?>
                <a href="edit_active_auction.php?id=<?=$IDS[$k]?>"><img src="images/edititem.gif" width="13" height="17" alt="<?=$MSG_632?>" border="0"></a>
                <?
                } else {
                	print "&nbsp;";
                }
			?>
            </td>
            <td width="8%"  align=CENTER>
                <?
                if($BID[$k] == 0) {
			  ?>
                <input type="checkbox" name="O_delete[]" value="<?=$IDS[$k]?>">
                <?
                } else {
                	print "&nbsp;";
                }
			  ?>
            </td>
            <td width="6%"  align=CENTER bgcolor="#FFFFaa" class=white>
                <input type="checkbox" name="startnow[]" value="<?=$IDS[$k]?>" />
            </td>
        </tr>
        <?
        	}
        }
			?>
		<TR bgcolor="<?=$BGCOLOR?>">
		<TD colspan=4>&nbsp;</TD>
		<TD align=center><a href="javascript: void(0)" onclick="selectAllDelete(document.open,1)"><?=$MSG_30_0102?></A></TD>
		<TD align=center><a href="javascript: void(0)" onclick="selectAllStart(document.open,1)"><?=$MSG_30_0102?></A></TD>
		</TR>
        <tr>
            <td colspan="6" align="center">
                <input type="hidden" name="action" value="delopenauctions" />
                <input type="submit" name="Submit" value="<?=$MSG_631?>" class=button onClick=ConfirmDel() />
            </td>
        </tr>
    </table>
</form>
<table width=100% cellpadding=0 cellspacing=0 border=0>
    <tr>
        <td align=CENTER>
            <?=$MSG_5117?>
&nbsp;&nbsp;
            <?=$PAGE?>
            <?=$MSG_5118?>
&nbsp;&nbsp;
            <?=$PAGES?>
            <br>
            <?
                $PREV = intval($PAGE - 1);
                $NEXT = intval($PAGE  + 1);
                if($PAGES > 1) {
                	if($PAGE > 1) {
				?>
            <a href="<?=basename($_SERVER['PHP_SELF'])?>?PAGE=<?=$PREV?>"><u>
            <?=$MSG_5119?>
            </u></a> &nbsp;&nbsp;
            <?
                	}
                	$LOW = $PAGE - 5;
                	if($LOW <= 0) $LOW = 1;
                	$COUNTER = $LOW;
                	while($COUNTER <= $PAGES && $COUNTER < ($PAGE+6)) {
                		if($PAGE == $COUNTER) {
                			print "<B>$COUNTER</B>&nbsp;&nbsp;";
                		} else {
                			print "<A HREF=\"".basename($_SERVER['PHP_SELF'])."?PAGE=$COUNTER\"><U>$COUNTER</U></A>&nbsp;&nbsp;";
                		}
                		$COUNTER++;
                	}
					?>
&nbsp;&nbsp;
            <?
                if($PAGE < $PAGES) {
					?>
            <a href="<?=basename($_SERVER['PHP_SELF'])?>?PAGE=<?=$NEXT?>"><u>
            <?=$MSG_5120?>
            </u></a>
            <?
                }
                }
				?>
        </td>
    </tr>
</table>
<?
include phpa_include("template_user_menu_footer.html");
?>
